﻿using Common.Prism.Apps;
using NxChatQQ.Views;
using Prism.Commands;
using System.Windows.Input;

namespace NxChatQQ.ViewModels
{
    public class LoginWindowViewModel : BaseViewModel
    {
        public ICommand LoginClickCommand { get; set; }


        public LoginWindowViewModel()
        {
            LoginClickCommand = new DelegateCommand(LoginClickExecuted);
        }

        private void LoginClickExecuted()
        {
            // 获得窗口管理器
            var windowsProviderService = Global.WindowService;
            // 新开一个窗口
            windowsProviderService.Show<MainWindow>(true);
            // 关闭本窗口
            windowsProviderService.Close<LoginWindow>();

        }
    }
}
